<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="../css/2.css">
</head>
<body>
  <button id="btn">死循环</button>
  <div class="ball ball1"></div>
  <div class="ball ball2"></div>
  <script src="../js/delay.js"></script>
  <script>
    //dom
    let btn = document.querySelector('button');
    btn.onclick = function(){
      delay(5000);
    }
  </script>
</body>
</html>